Nesting using rigid body simulation

ABSTRACT

Embodiments of the invention provide systems and methods for nesting objects in 2D sheets and 3D volumes. In one embodiment, a nesting application simplifies the shapes of parts and performs a rigid body simulation of the parts dropping into a 2D sheet or 3D volume. In the rigid body simulation, parts begin from random initial positions on one or more sides and drop under the force of gravity into the 2D sheet or 3D volume until coming into contact with another part, a boundary, or the origin of the gravity. The parts may be dropped according to a particular order, such as alternating large and small parts. Further, the simulation may be translation- and/or position-only, meaning the parts do not rotate and/or do not have momentum, respectively. Tighter packing may be achieved by incorporating user inputs and simulating jittering of the parts using random forces.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of the co-pending U.S. patentapplication titled, “NESTING USING RIGID BODY SIMULATION,” filed on Nov.14, 2016 and having Ser. No. 15/351,302, which is a continuation ofco-pending U.S. patent application titled, “NESTING USING RIGID BODYSIMULATION,” filed on Sep. 17, 2013 and having Ser. No. 14/029,353,which claims the benefit of U.S. provisional application titled,“NESTING USING RIGID BODY SIMULATION,” filed on Sep. 18, 2012 and havingSer. No. 61/702,663. The subject matter of these related applications ishereby incorporated herein by reference.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention generally relates to computer software. Morespecifically, the present invention relates to techniques for nestingparts in two-dimensional (2D) sheets and three-dimensional (3D) volumesusing rigid body simulations.

Description of the Related Art

When printing objects from sheets or volumes of materials, manufacturerstypically attempt to arrange the objects so as to maximize the use, andminimize the waste, of the materials. One approach manufacturerscurrently use arranges the object so that their bounding boxes do notintersect. Such an approach works best for square or rectangular, i.e.,“box-like” parts, and is less suitable for parts whose shapes are lessbox-like. As a result, this approach often leads to the waste ofmaterial.

SUMMARY OF THE INVENTION

One embodiment of the present invention sets forth a method for nestinga plurality of parts. The method includes receiving the plurality ofparts, each part including geometry which represents a 2D or 3D objectwhich is to be manufactured from a material, and performing a rigid bodysimulation to generate the nesting of the parts, which provides apattern for manufacturing the 2D or 3D objects represented by the partsfrom the sheet or volume of the material. The rigid body simulationitself may comprise, for each of one or more of the parts: selecting alocation for dropping the part into 2D sheet geometry or 3D volumegeometry which represents a sheet or volume of the material,respectively, and simulating a dropping of the part into the 2D sheetgeometry or 3D volume geometry from the selected location.

Other embodiments include a computer-readable medium that includesinstructions that enable a processing unit to implement one or moreembodiments of the disclosed methods as well as a system configured toimplement one or more embodiments of the disclosed methods.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentinvention can be understood in detail, a more particular description ofthe invention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIGS. 1A-1E illustrate an approach for nesting parts in a sheet,according to an embodiment of the invention.

FIG. 2 illustrates an approach for simplifying the shapes of parts,according to an embodiment of the invention.

FIG. 3 illustrates a method for nesting parts using a rigid bodysimulation, according to an embodiment of the invention.

FIG. 4 illustrates one of the steps shown in FIG. 3, according to anembodiment of the invention.

FIG. 5 illustrates a computer system configured to implement one or moreaspects of the present invention.

DETAILED DESCRIPTION

Embodiments disclosed herein provide techniques for nesting parts in 2Dsheets and 3D volumes. As used herein, “part” refers to geometryrepresenting a 2D or 3D object which is to be manufactured from amaterial, and “nesting” refers to the process of packing parts within a2D or 3D boundary. In one embodiment, a nesting application simplifiesthe shapes of parts and performs a rigid body simulation of the partsdropping into 2D sheet or 3D volume geometry which represents thephysical sheet or volume of material from which parts are to be printed.The rigid body simulation is performed as a physics-based simulation(i.e., a mathematical model of one or more objects that describes themotion of those objects relative to a reference point) in which partsare assumed to be rigid (i.e., that they do not deform) and areinfluenced by forces including gravity. In one embodiment, the partsbegin from random initial positions on one or more sides of the 2D sheetor 3D volume, and drop under the force of gravity into the 2D sheet or3D volume until coming into contact with another part, the boundary ofthe 2D sheet or 3D volume, or the origin of the gravity (if gravity ismodeled as originating from a point within the 2D sheet or 3D volume).The parts may be dropped according to a particular order, such asalternating between large and small parts. Friction may or may not besimulated, or turned off initially to allow free motion and thenenabled, so that the simulation finishes quickly. In some embodiments,the rigid body simulation may be translation- and/or position-only,meaning the parts do not rotate and/or do not have momentum,respectively. In a further embodiment, the simulation may treatcollisions as inelastic such that parts stop when they experience acollision. Packing the parts more tightly within the 2D sheet or 3Dvolume may be achieved by incorporating user inputs, such as allowingthe user to drag a part into an empty space during the simulation, andjittering the parts using random forces during the simulation, which isakin to “shaking” the parts.

FIGS. 1A-1E illustrate an approach for nesting parts in a 2D sheet,according to an embodiment. FIG. 1A shows a 3D model 105 which isdecomposed into a plurality of parts 110. In general, each of the parts110 _(i) may represent an area (e.g., a region in the plane) or volume(e.g., a cross-section slice) of the 3D model 105. In general, the parts110 may be generated from the model 105 by any feasible means, such asby cutting the model 105 with slice planes at regular intervals, or bymanually dividing the model 105 into separate parts.

FIG. 1B illustrates a nesting of the parts 110 in a sheet 116 determinedby performing a rigid body simulation. In the simulation, the parts 110are dropped into the sheet 116 through a top side 117 of the sheet.Gravity is modeled as originating from a point infinitely below thesheet 116 such that the parts 110 fall towards a bottom side 117 of thesheet 116. The top side 117 of the sheet 116, from which parts aredropped, is modeled as “open,” thereby permitting parts to enter thesheet 116. In contrast, the bottom 117 and the sides 119, 120 of thesheet 116 are modeled as walls with which the parts 110 may collide. Inalternative embodiments, the gravity may originate from differentlocations, such as a point at the center of the sheet 116 or a corner ofthe sheet 116, and the sheet 116 may have more open sides which permitparts 110 to enter. For example, parts may be dropped from the top andone side of a rectangular sheet, with gravity originating from a bottomcorner which is opposite the side from which parts are dropped.

As shown, the shape of part 110 _(i) is simplified to shape 115 _(i). Ingeneral, rigid body simulations are more easily performed using shapesthat are round, as opposed to shapes having concave regions and manydetails. As discussed in greater detail below, the shape of part 110_(i) may be simplified by, e.g., expanding concave regions of thepolygon/mesh to push the part 110 _(i) towards being convex, as well asremoving some details. The simplified shape 115 _(i) may further bedecomposed into a union of convex pieces so that rigid body simulationmay use efficient collision detection algorithms which require convexpolygons (or polyhedral, where the parts are 3D).

Once the shapes of parts are simplified, the nesting application maydrop the parts 110, beginning from random locations at the top 117 ofthe sheet 116. Parts 110 may be dropped in a given order to improvepacking. For example, experience has shown that alternatively droppinglarger and smaller parts may be effective. In such a case, parts greaterin size than a given threshold may be separated from those smaller thanthe threshold. Then, a given number (e.g., 1) of the larger-sized partsmay be dropped, after which a given number (e.g., 2) of thesmaller-sized parts are dropped, and this process may repeat until thesheet 116 is filled, i.e., further pieces that are dropped can no longerfit in the sheet 116. Note, even if one piece which is dropped cannotfit, the nesting application may attempt, for up to a given number oftimes, to drop the piece again from a different random location. Aftertrying for the given number of times, the nesting application may moveon to another piece until, e.g., a given number of pieces have beenunable to fit. At that time, the nesting application may begin droppingthe remaining pieces, including those that did not fit, in anothersheet.

In one embodiment, the simulation may be translation-only such that theparts cannot rotate. Doing so may keep the parts aligned along aparticular orientation, such as a strong axis of a material. In anotherembodiment, the simulation may be position-only such that the parts haveno momentum, thereby minimizing potential energy directly rather thanunnecessarily exchanging between kinetic and potential energy.

FIG. 1C illustrates the result of the simulation of dropping parts. Asshown, the parts 110 _(i) have settled and are packed in sheet 116.Illustratively, roughly three-quarters of the sheet 116 is used forparts, while approximately one-quarter of the sheet remains available.In another embodiment, the nesting application may scale the parts andperform further rigid body simulations to determine the largest partswhich may be printed from the sheet 116.

As further shown in FIG. 1C, the nesting application may simulatejittering the parts 110 using random forces 120 ₁₋₃ that act on one or anumber of the parts 110, as part of the rigid body simulation. Similarto the gravitational force which causes the parts 110 to drop, therandom forces 120 ₁₋₃ may act on the parts 110 to cause the parts totranslate, rotate, collide with other parts or walls of the sheet 116,etc. Doing so is analogous to shaking the parts 110. In one embodiment,the nesting application may simulate the application of random forces,then accept the resulting configuration of parts if the packing density,i.e., the density of the parts in the packed configuration, increases.In another embodiment, the jittering of parts with random forces may becombined with simulated annealing. During each iteration of thesimulated annealing, random forces are applied and new configurationsaccepted or rejected based on an energy corresponding to the packingdensity. Higher energies (i.e., lower packing densities) after a stepmay be accepted as well, but the probability of such acceptance isproportional to a temperature, which is lowered at each iteration basedon a cooling schedule.

In yet another embodiment, multiple dropping simulations may beperformed, the results of which may be the starting points for jitteringsimulations. Then, after the jittering simulations are performed, thetightest packing among the multiple simulations may be chosen. Inanother embodiment, the jittering simulations may be omitted, and atightest packing among multiple dropping simulations may be choseninstead. As used herein, a tighter packing refers to a configuration ofparts which is more dense, i.e., a configuration in which there are moreparts per area or volume of the sheet/volume. In a tighter packing, lessarea or volume of the sheet/volume is needed to produce a set ofnon-overlapping parts.

FIG. 1D illustrates the result of the jittering simulation. As shown,the parts 110 have settled and are packed in a different configurationin sheet 116 than before the jittering simulation. As discussed, theconfiguration may be accepted only if its packing density is greaterthan the previous configuration. As further shown, a user drags the part110 _(i) to location 117. In general, user input may be used to changethe results of the rigid body simulation to achieve a tighter packing ofthe parts 110, or some other objective, such as aligning parts along astrong axis of a material where the material is non-homogenous. In oneembodiment, the rigid-body simulation may be active during the drag ofpart 110 _(i) to location 117. In such a case, the act of dragging part110 _(i), may displace some of the other parts 110 to a newconfiguration, depicted in FIG. 1E.

Although discussed above primarily with respect to a rectangular sheet116, other 2D sheets and 3D volumes of any size and shape may be usedinstead. For example, the rigid body simulation may drop parts into a 3Dvolume where parts are being printed from a 3D block of material, asopposed to a 2D sheet of material.

FIG. 2 illustrates an approach for simplifying the shapes of parts,according to an embodiment. As shown in panel A, the part 110.sub.iwhich is received by a nesting application may include smooth borders, aconcave region 202, and a detailed region 201. Illustrative, the part110 _(i) is preprocessed into a polygon 111 ₁, as shown in panel B. In3D, parts may be preprocessed into triangle meshes. Algorithms forgenerating polygons and triangle meshes from arbitrary geometry arewell-known and publicly available. As further shown in panel B, thepolygon 111 _(i) representing part 110 _(i), includes a concave region202′ corresponding to the concave region 202 of the part 110 _(i), aswell as a region 201′ corresponding to the detailed region 201 of thepart 110 _(i).

Rigid body simulations are more efficiently performed using shapes thatare round, as opposed to shapes having concave regions and many details.As a result, the nesting application may simplify the shape of thepolygon 111 _(i) by expanding concave regions of the polygon 111 _(i) topush it towards being convex. For example, the nesting application mayadd an edge to eliminate the concave region 202′, the result of which isshown in panel C. This corresponds to adding a new triangle of materialto eliminate the concave vertex.

In addition, the nesting application may remove some details. As shownin panel D, detailed region 201′ has been simplified into region 201″,in which the details of region 201′ have been eliminated. In oneembodiment, expanding concave regions outwards and removing details maybe performed in a “safe” manner such that an intersection-freesimulation with the simplified shapes results in an intersection-freefinal layout of the original shapes. In other words, new triangles ofmaterial which eliminate concave regions are added, but not removed.

As shown, the polygon 111 _(i) is further decomposed into a union ofconvex pieces 205-207. Doing so permits the rigid body simulation tomake use of efficient collision detection algorithms which requireconvex polygons. Algorithms for decomposing polygons 111 _(i), arewell-known and publicly available, but such algorithms are typicallyslow. One embodiment instead uses a fast greedy algorithm which startsat a chosen works and picks out a maximal convex subpolygon by walkingaround the original polygon maintaining convexity. The subpolygon isthen removed and the process continued until the entire original isexplored. Although depicted as non-overlapping, the convex pieces 205into which the polygon 111 _(i) is decomposed may overlap in someembodiments, so long as the union of the convex pieces 205 includes theentire geometry of the part 110 _(i).

Although discussed above primarily with respect to simplifying anddecomposing a 2D part 110 _(i) into convex polygons, similar steps maybe performed to simplify a 3D part and decompose the 3D part into convexpolyhedral.

FIG. 3 illustrates a method 200 for nesting parts using a rigid bodysimulation, according to an embodiment. As shown, the method 300 beginsat step 210, where a nesting application receives 2D or 3D parts and arepresentation of a sheet or volume from which the parts are to beprinted. In general, the sheet or volume being represented may be of anyshape or size. In some cases, the physical sheet or volume may be used,i.e., pieces may have previously been cut from it. In such a case, oneor more photographs may be taken of the physical sheet or volume, andthe holes where pieces were previously cut may be reconstructed using,e.g., vision algorithms. That is, the nesting application (or some otherapplication) may determine the shapes, sizes, and orientations of theholes using any feasible vision algorithm, such as an algorithm whichextracts edges corresponding to holes from the photographs. Such holesmay then be added as obstacles in the rigid body simulation, discussedbelow, so that parts which are dropped collide with the holes during thesimulation.

At step 320, the nesting application simplifies the shapes of thereceived parts. In one embodiment, e.g., the shapes may be preprocessedinto polygons in 2D or triangle meshes in 3D, the polygons or meshes maybe simplified, and then the polygons/meshes may be decomposed intoconvex polygons/meshes. As discussed, rigid body simulations are moreefficiently performed using shapes that are round, as opposed to shapeshaving concave regions and many details. As a result, the shapesimplification may include expanding concave regions of the polygon/meshto push it towards being convex. The shape simplification may furtherinclude removing some details. Both expanding concave regions outwardsand removing details may be performed in a “safe” manner such that anintersection-free simulation with the simplified shapes results in anintersection-free final layout of the original shapes. The simplifiedshapes may further be decomposed into a union of convex pieces. In sucha case, the rigid body simulation may use fast collision detectionalgorithms for convex polygons and polyhedra, making the simulation moreefficient.

At step 330, the nesting application selects, for each simplified part,a location for dropping the part into the sheet or volume, and thenesting application then performs a rigid body simulation of the drop.Here, the drops may begin from one or more open sides of the sheet orvolume, with the remaining sides of the sheet/volume being walls withwhich the dropped parts may collide. The parts may be dropped in anygiven order, such as randomly, larger parts first, alternating betweenlarge and small parts, etc. Experience has shown that alternatingbetween large and small parts is an effective approach for tightlypacking parts. Gravity may originate from any point, such as aninfinitely distant point, from the center of the sheet/volume, from acorner of the sheet/volume, etc. For example, 3D printers often have apreferential corner from which printing begins. In such a case, gravitymay originate from the preferential corner. In one embodiment, thenesting application may perform the rigid body simulation of dropsaccording to FIG. 4, discussed below. The orientation of the parts maybe random, or nonrandom. For example, in non-homogenous materials havinga stronger axis, parts may be aligned with this axis so that the printedobjects may benefit from the strength of the material along that axis.Advantageously, the rigid body simulation is a relativelycomputationally inexpensive operation to perform. As a result, areasonably tight packing of the parts in the sheet/volume may be quicklyobtained.

As discussed, the simulation may be translation-only such that the partscannot rotate. Doing so may keep the parts aligned along a particularorientation, such as a strong axis of a material. In another embodiment,the simulation may be position-only such that the parts have nomomentum, thereby minimizing potential energy directly rather thanunnecessarily exchanging between kinetic and potential energy.

At step 340, the nesting application simulates jittering of the partswith random forces. After the dropping of pieces is simulated, tighterpacking of the parts may be achieved by such jittering of the parts.Doing so is analogous to shaking the sheet/volume to allow the parts tosettle. In one embodiment, the nesting application may simulate theapplication of such random forces, then accept the resultingconfiguration of parts if the packing density increases. If longercomputation times are available, the jittering of parts with randomforces may further be combined with simulated annealing. For example,random forces may be applied and new configurations accepted or rejectedat each iteration of the simulated annealing process based on an energycorresponding to the packing density. Higher energies (i.e., lowerpacking densities) after a step may be accepted, but the probability ofsuch acceptance may be proportional to a temperature, which is loweredat each iteration of the simulated annealing based on a coolingschedule. In yet another embodiment, multiple dropping simulations maybe performed, the results of which may be the starting points for thejittering simulations. Then, after the jittering simulations areperformed, the tightest packing among the multiple simulations may bechosen. Of course, the jittering simulations may be omitted, and atightest packing among multiple dropping simulations chosen.

At step 350, the nesting application receives and incorporates userinput. Doing so may help further improve the packing density of theparts within the sheet/volume. For example, an interface may present therigid body simulation, pausing periodically to permit a user to dragparts to empty areas of the sheet. The nesting application may thendetermine a reconfiguration of all of the parts, given the relocation ofthe part by the user, by simulating the drop of the parts under theforce of gravity after the part which the user chose is removed andrelocated. Note, a user may also choose to relocate or reorient partsfor reasons other than improving packing density. For example, the usermay relocate or reorient parts to take advantage of certaincharacteristics of the sheet or volume such as a stronger axis, to givepreferential space to certain parts such as large parts, and the like.The nesting application may also incorporate user input that is providedafter the rigid body or jittering simulations of steps 230 and 240. Insuch cases, the rigid body simulation may still be active, and thenesting application may reconfigure the parts based on the user input,similar to the discussion above.

In one embodiment, a machine such a 3D printer may receive theconfiguration of parts output by the nesting application. The machinemay then cut or otherwise remove areas represented by the parts from aphysical sheet or volume, according to the configuration of parts. Forexample, the physical sheet or volume may include metal, textiles, wood,and other materials, and the machine may cut the sheet or volume intoshapes using, e.g., stamping, water jet, laser cutters, and the like. Ofcourse, the areas represented by the parts may be manually cut from thesheet/volume as well.

FIG. 4 further illustrates step 330 of FIG. 3, according to anembodiment. At step 331, the nesting application selects a part to dropin the rigid-body simulation. Generally, parts may be dropped in anyorder. Experience has shown an effective order is to alternatively droplarger and smaller parts. For example, parts greater in size than agiven threshold may be separated from those smaller than the threshold.Then, a given number (e.g., 1) of the larger-sized parts may be dropped,after which a given number (e.g., 2) of the smaller-sized parts aredropped, and this process may repeat until the sheet is filled. Ofcourse, other orders are possible, e.g., larger parts followed bysmaller parts, dropping parts at random, etc.

At step 332, the nesting application selects a random location for thedrop. Then, at step 333, the nesting application performs the dropsimulation, beginning from the selected random location. As discussed,the drop may also be performed beginning from a random orientation, or anon-random orientation. In one embodiment, collisions may be simulatedas inelastic such that the parts settle immediately after colliding withanother object (e.g., a wall or another part). This approach isgenerally more efficient than simulating elastic bounces. For example,parts may be simulated as having zero mass to produce inelasticcollisions. In alternative embodiments, the parts may instead besimulated with some mass, and collisions may be elastic. In otherembodiments, the parts and the walls of the sheet/volume may besimulated as having zero friction coefficients, or non-zero frictioncoefficients, so that the parts slide against each other and the wall,or stick without sliding, respectively.

In other embodiments, the rigid body simulation may be translation-onlyor position-only for some (or all) of the parts. As used herein, a“translation-only” simulation is one in which the translationalpositions of parts are adjusted, but not their rotations. In oneembodiment, the simulation may treat the parts as having infinitemoments of inertia so that the parts do not rotate. For example,materials such as textiles have a strong axis, and the parts may bealigned with the strong axis throughout the translation-only simulation.

In position-only simulations, the simulation may be performed with nomomentum variables. Only the final configuration of the parts isimportant for determining a parts layout on a sheet or volume ofmaterials, not the trajectories those parts take to reach a finalposition. Performing the simulation without momentum variables thusoptimizes the simulation by minimizing potential energy directly ratherthan exchanging between kinetic and potential energy. Similarly, thenesting application may perform the simulation without a time variable.In such a case, each rigid part may simply be moved along the energyminimizing path as far as possible until the part collides with anotherobject or comes to the origin of gravity.

At step 334, the nesting application determines whether the part fits inthe sheet or volume after the drop. That is, the nesting applicationdetermines whether any area or volume of the part lies outside of thearea or volume of the 2D sheet or 3D volume subsequent to thesimulation. If the part fits in the sheet or volume, the method 300continues at step 337, where the nesting application determines whetherthere are additional parts to drop, and, if such is the case, the method300 returns to step 331, where the nesting application selects anotherpart to drop.

If the part does not fit in the sheet or volume, then at step 335, thenesting application determines whether a maximum number of tries havebeen attempted for the part. If such is not the case, the nestingapplication may make further attempt(s) to drop the part into the sheetor volume. That is, the method 300 returns to step 332, where thenesting application selects a new random location for performing thedrop. In one embodiment, the nesting application may also select adifferent orientation for the part, such as a random orientation.

If a maximum number of tries have been attempted, then at step 336, thenesting application determines whether the maximum number of parts havebeen tried. That is, the nesting application may try to fit a givennumber of parts (e.g., 10), each for up to a given number of times(e.g., 10). The number of parts tried, and the number of tries for eachpart, may be user-specified or automatically determined.

If the maximum number of parts have been tried, then at step 338, thenesting application may switch to another sheet or volume, and thenselect another part to drop into that sheet or volume at step 331. If,on the other hand, the maximum number of parts have not yet been tried,then at step 337, the nesting application determines whether there areadditional parts to try. If such is the case, the method 300 returns tostep 331, where the nesting application selects another part to drop.If, however, no parts remain to be tried, the method 300 continues atstep 339, where the nesting application determines whether any partsremain to be nested. The remaining parts may include parts that couldnot fit into the current (and any previous) sheet or volume. Ifremaining parts exist, then at step 338, the nesting applicationswitches to another sheet or volume into which the remaining parts maybe dropped.

FIG. 5 illustrates a computer system 500 configured to implement one ormore aspects of the present invention. As shown, the system 500includes, without limitation, a central processing unit (CPU) 510, anetwork interface 530, an interconnect 515, a memory 560, and storage520. The system 500 may also include an I/O device interface 540connecting I/O devices 550 (e.g., keyboard, display and mouse devices)to the system 500.

The CPU 510 retrieves and executes programming instructions stored inthe memory 560. Similarly, the CPU 510 stores and retrieves applicationdata residing in the memory 560. The interconnect 515 facilitatestransmission, such as of programming instructions and application data,between the CPU 510, I/O device interface 540, storage 520, networkinterface 530, and memory 560. CPU 510 is included to be representativeof a single CPU, multiple CPUs, a single CPU having multiple processingcores, and the like. And the memory 560 is generally included to berepresentative of a random access memory. The storage 520 may be a diskdrive storage device. Although shown as a single unit, the storage 520may be a combination of fixed and/or removable storage devices, such asfixed disc drives, floppy disc drives, tape drives, removable memorycards or optical storage, network attached storage (NAS), or a storagearea-network (SAN). Further, system 500 is included to be representativeof a physical computing system as well as virtual machine instanceshosted on a set of underlying physical computing systems. Further still,although shown as a single computing system, one of ordinary skill inthe art will recognized that the components of the system 500 shown inFIG. 5 may be distributed across multiple computing systems connected bya data communications network.

As shown, the memory 560 includes an operating system 561 and a nestingapplication 562. The nesting application 562 is configured to determinea packing of parts within a boundary of a 2D sheet or 3D volume. In oneembodiment, the nesting application 562 may perform a rigid bodysimulation of the parts dropping into the 2D sheet or 3D volume, asdiscussed above with respect to FIG. 3. As discussed, the rigid-bodysimulation may include various optimizations, such as beingposition-only or translation-only. Doing so may permit the simulation tobe more efficient, or take advantage of certain material properties,such as a stronger axis along which parts may be aligned. In addition,the nesting application 562 may perform, as part of the rigid-bodysimulation, a simulation of jittering the parts with random forcesand/or a simulated annealing after the dropping simulation to identify atighter packing of the parts. The nesting application 562 may furtherincorporate user input while the rigid-body simulation is active, asdiscussed above with respect to FIGS. 2 and 3. For example, the user mayrelocate or reorient parts to take advantage of certain characteristicsof the sheet or volume such as a stronger axis, to give preferentialspace to certain parts such as large parts, and the like. The nestingapplication 562 may further send a configuration of parts to a machinethat is able to cut or otherwise remove areas represented by the partsfrom a physical sheet or volume. Of course, the areas represented by theparts may also be manually cut from the sheet/volume based on theconfiguration of parts.

Advantageously, embodiments presented herein permit parts to be arrangedon a material so as to make effective use of the material in 3D printingor manufacturing. Further, a rigid body simulation is a relativelycomputationally inexpensive to perform, so nesting operations may beperformed quickly.

While the forgoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof. For example, aspects of thepresent invention may be implemented in hardware or software or in acombination of hardware and software. One embodiment of the inventionmay be implemented as a program product for use with a computer system.The program(s) of the program product define functions of theembodiments (including the methods described herein) and can becontained on a variety of computer-readable storage media. Illustrativecomputer-readable storage media include, but are not limited to: (i)non-writable storage media (e.g., read-only memory devices within acomputer such as CD-ROM disks readable by a CD-ROM drive, flash memory,ROM chips or any type of solid-state non-volatile semiconductor memory)on which information is permanently stored; and (ii) writable storagemedia (e.g., floppy disks within a diskette drive or hard-disk drive orany type of solid-state random-access semiconductor memory) on whichalterable information is stored. Such computer-readable storage media,when carrying computer-readable instructions that direct the functionsof the present invention, are embodiments of the present invention.Therefore, the scope of the present invention is determined by theclaims that follow.

We claim:
 1. A method implemented by a processor, the method comprising:for each part included in a plurality of parts: selecting a location atwhich to drop the part into a two-dimensional (2D) representation of asheet of material to use in manufacturing an object represented by thepart or into a three-dimensional (3D) representation of a volume of amaterial to use in manufacturing a 3D object represented by the part,and performing a simulation of dropping the part into the 2Drepresentation or into the 3D representation from the selected location;and generating a nesting of the parts included in the plurality of partsbased on the simulations to provide a pattern for manufacturing theobjects from the sheet of the material or for manufacturing the 3Dobjects from the volume of the material.
 2. The method of claim 1,further comprising, simplifying the shapes of the parts included in theplurality of parts prior to performing the rigid-body simulation.
 3. Themethod of claim 2, wherein, for each part included in the plurality ofparts, simplifying includes expanding concave regions of a polygon ormesh representing the part.
 4. The method of claim 3, further comprisingdecomposing each polygon or mesh into a union of convex pieces.
 5. Themethod of claim 1, further comprising jittering the parts included inthe plurality of parts with random forces, and accepting a packingconfiguration after jittering the parts when a packing density of theparts in the 2D sheet geometry or 3D volume geometry increases.
 6. Themethod of claim 5, further comprises performing a simulated annealing,wherein a new configuration after jittering the parts and performing thesimulated annealing is accepted based on a temperature value and achange in packing density.
 7. The method of claim 1, further comprisingreceiving user input repositioning a first part included the pluralityof parts, while performing at least one of the simulations,repositioning the first part according to the user input.
 8. The methodof claim 1, wherein at least one of the simulations comprises aposition-only simulation in which at least one of a momentum variableand a time variable is zero.
 9. The method of claim 1, wherein at leastone simulation comprises a translation-only simulation in which at leastone part is modeled as having infinite moments of inertia.
 10. Themethod of claim 1, wherein the 2D representation or the 3Drepresentation includes holes that are modeled as obstacles in one ormore of the simulations.
 11. The method of claim 1, wherein, across aplurality of the simulations, a first predefined number of large partsand a second predefined number of small parts are droppedinterchangeably.
 12. A non-transitory computer-readable medium includinginstructions that, when executed by a processor, configure the processorto perform the steps of: for each part included in a plurality of parts:selecting a location at which to drop the part into a two-dimensional(2D) representation of a sheet of material to use in manufacturing anobject represented by the part or into a three-dimensional (3D)representation of a volume of a material to use in manufacturing a 3Dobject represented by the part, and performing a simulation of droppingthe part into the 2D representation or into the 3D representation fromthe selected location; and generating a nesting of the parts included inthe plurality of parts based on the simulations to provide a pattern formanufacturing the objects from the sheet of the material or formanufacturing the 3D objects from the volume of the material.
 13. Thenon-transitory computer-readable medium of claim 12, further comprising,simplifying the shapes of the parts included in the plurality of partsprior to performing the rigid-body simulation.
 14. The non-transitorycomputer-readable medium of claim 13, wherein, for each part included inthe plurality of parts, simplifying includes expanding concave regionsof a polygon or mesh representing the part.
 15. The non-transitorycomputer-readable medium of claim 14, further comprising decomposingeach polygon or mesh into a union of convex pieces.
 16. Thenon-transitory computer-readable medium of claim 12, further comprisingjittering the parts included in the plurality of parts with randomforces, and accepting a packing configuration after jittering the partswhen a packing density of the parts in the 2D sheet geometry or 3Dvolume geometry increases.
 17. The non-transitory computer-readablemedium of claim 16, further comprises performing a simulated annealing,wherein a new configuration after jittering the parts and performing thesimulated annealing is accepted based on a temperature value and achange in packing density.
 18. The non-transitory computer-readablemedium of claim 12, further comprising receiving user inputrepositioning a first part included the plurality of parts, whileperforming at least one of the simulations, repositioning the first partaccording to the user input.
 19. The non-transitory computer-readablemedium of claim 12, wherein at least one of the simulations comprises aposition-only simulation in which at least one of a momentum variableand a time variable is zero.
 20. The non-transitory computer-readablemedium of claim 12, wherein at least one simulation comprises atranslation-only simulation in which at least one part is modeled ashaving infinite moments of inertia.
 21. The non-transitorycomputer-readable medium of claim 12, wherein the 2D representation orthe 3D representation includes holes that are modeled as obstacles inone or more of the simulations.
 22. The non-transitory computer-readablemedium of claim 12, wherein, across a plurality of the simulations, afirst predefined number of large parts and a second predefined number ofsmall parts are dropped interchangeably.
 23. A system, comprising: amemory storing instructions; and a processor that is coupled to thememory and, when executing the instructions, is configured to: for eachpart included in a plurality of parts: select a location at which todrop the part into a two-dimensional (2D) representation of a sheet ofmaterial to use in manufacturing an object represented by the part orinto a three-dimensional (3D) representation of a volume of a materialto use in manufacturing a 3D object represented by the part, and performa simulation of dropping the part into the 2D representation or into the3D representation from the selected location, and generate a nesting ofthe parts included in the plurality of parts based on the simulations toprovide a pattern for manufacturing the objects from the sheet of thematerial or for manufacturing the 3D objects from the volume of thematerial.